{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
 <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="get">
                <div class="box-header with-border">
                    <span class="fa  fa-volume-up" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <a href="index.php?a=notice.list" class="btn btn-default">校内事物</a>
                    <a href="index.php?a=inform.uplist&inform_type={%$inform_type%}" class="btn btn-primary">上级通知</a>
                </div>
                <div class="box-body">
				    <div class="col-md-2 form-group" style="padding:0;">
						  <label class="col-sm-5 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   标题：
						  </label>
						  <div class="input-group col-md-7 col-xs-12">
							    <input type="text" class="form-control" value="{%$inform_title%}" name="inform_title">
						  </div> 
				    </div>
					<div class="col-md-3 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-6 control-label text-right" style="padding-right:0; padding-left:0; font-weight:500; margin:0;">
							   上级部门：
						  </label>
						  <div class="input-group col-md-6 col-xs-12">
							   <select class="form-control" name="up_id">
							   <option value="">全部</option>
							   {%foreach from=$up_lists key=key item=value%}
                                  <option value="{%$value.up_id%}"{%if $value.up_id == $up_id%}selected{%/if%}>{%$value.up_name%}</option>
                               {%/foreach%}
                                </select>
						  </div>	  
				    </div>
					<div class="col-md-5 col-xs-12 form-group" style="padding:0;">
						  <label for="inputPassword3" class="col-sm-3 control-label text-right" style="padding:0;font-weight:500; margin:0;">
							  要求完成时间：
						  </label>
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$from%}" id="from" name="from">
							    
						  </div>
						  <span style="float:left;">  ~  </span >
						  <div class="input-group col-md-4" style="float:left;">
							   <input type="text" class="form-control" value="{%$to%}" id="to" name="to">
							      <div class="input-group-addon" style="padding:6px 7px;">
									 <i class="fa fa-calendar"></i>
								 </div>
						  </div>						  
				    </div>
					<div class="col-md-1 col-xs-12">
					   <input type="hidden" name="inform_type" value="{%$user.type_id%}">
					   <input type="hidden" name="inform_type" value="{%$inform_type%}">
					   <input type="hidden" name="a" value="inform.uplist">
					   <button type="submit" class="btn btn-warning">查 询</button>
					</div>
					<div style="clear:both; height:10px;"></div>

                      <table class="table table-bordered table-striped"  id="mytable">
                                <thead>
                                    <tr style=" background-color:#a273ff;">
                                        <td>标题</td>
                                        <td>文档号</td>
										<td>上级部门</td>
										<td>下达时间</td>
                                        <td>要求完成时间</td>
                                        <td>附件</td>
                                        <td>完成状态</td>
                                        <td>内部完成时间</td>
                                        <td>操作</td>
                                    </tr>	
                                </thead>
                                <tbody>
								{%foreach from=$inform_lists key=key item=value%}
                                    <tr>
                                        <td><a href="index.php?a=inform.dispensedetails&inform_type={%$inform_type%}&inform_id={%$value.inform_id%}">{%$value.inform_title%}</a></td>
                                        <td>{%$value.inform_num%}</td>
										<td>{%$value.up_name%}</td>
                                        <td>{%$value.start_time%}</td>
                                        <td>{%$value.end_time%}</td>
                                        <td>{%$value.inform_file%}</td>
                                        <td>
											{%if $value.is_read ==1 %}完成{%else%}未完成{%/if%}
										</td>
                                        <td>{%$value.read_time%}</td>
                                        <td>
											{%if $value.is_show ==1 %}
											 <a class="btn btn-success btn-xs" >已完成</a>

											{%else%}
                                             <a class="btn btn-danger btn-xs" href=""data-toggle="modal" data-target="#myModal" onClick="show('{%$value.inform_id%}')" >完成事务</a>
											 {%/if%}
                                        </td>
                                    </tr>
								 {%/foreach%}
                            </tbody>
                        </table>
				   </div><!--box-body -->
				   <div class="box-footer">
				   {%$page%}
				   </div>
               </form>
           </div><!--box box-default box-solid-->
        </section>              
      </div><!--row-->
    </section>
 </div>
 <!--弹出框-->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog" style="width:300px;">
	<div class="modal-content" style="margin-top:120px;">
	  <form name="form2" action="" method="post">
		  <div class="modal-header" style="border-bottom:0px;">
			<button type="button" class="close" data-dismiss="modal"><span     aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		  </div>
		  <div class="modal-body">
		     <p class="text-center" style="font-size:16px;">确定完成？</p> 
			
		  </div>
		  <div class="modal-footer">
			<input  type="hidden" name="inform_id" value="" id="aaa">			
			<button type="submit" class="btn btn-primary"  onclick="c();" >确定</button>
			<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
		  </div>
	  </form>
	</div>
  </div>
</div>
<!--弹出框-->
 <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
<script>
function show(a){
	
	$("#aaa").val(a);
	
	}
</script>


